<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
//return [
//    '__pattern__' => [
//        'name' => '\w+',
//    ],
//    '[hello]'     => [
//        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
//        ':name' => ['index/hello', ['method' => 'post']],
//    ],
//
//
//];


// 静态路由规则
/*
Route::rule('hello','index/Index/hello');
*/

// 动态路由规则，方式1
/*
Route::any('hello2/:name', 'index/index/hello2', [
    'ext'    => 'html',
    'method' => 'get',
]);
*/


// 动态路由规则，方式2
/*
Route::any('hello2/:name', 'index/index/hello2', [
    'ext'    => 'html',
    'method' => 'get',
]);
*/



// 动态路由规则，方式3
/*
Route::any('hello2/:name', 'index/index/hello2', [
    'ext'    => 'html',
    'method' => 'get',
], ['name' => '[A-Za-z0-9]+']);
*/

// 动态路由规则，方式4，简称：静态注册

return [
    'hello2/:name' => 'index/index/hello2',
];